<!DOCTYPE html>
<html {% block language %}zh-CN{% endblock %}>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="telephone=no" name="format-detection" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block title %}test{% endblock %}</title>

    <link href="{{ staticUrl }}/3rdparty/css/bootstrap.min.css" rel="stylesheet">
    <link href="{{ staticUrl }}/3rdparty/css/font-awesome.min.css" rel="stylesheet">
    <link href="{{ staticUrl }}/common/css/global.css" rel="stylesheet">

    {% block css %}
    {% endblock %}

    <script src="{{ staticUrl }}/3rdparty/js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="{{ staticUrl }}/3rdparty/js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function logout(){
            $.ajax({
                url:"/sso/logout",
                method:"delete",
                dataType:"json",
            }).done(function(data){
                location.assign("/sso/login")
            })
        }
    </script>

    {% block js %}
    {% endblock %}

</head>

<body>

<div class="header">
    <div class="left"><span class="sLogo"><a href="/"><img src="{{ img_logo }}" alt="" width="25" height="25" style="margin-right: 5px">{{ logo }}</a></span></div>
    <div class="right">
        <ul class="userCon">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle aUser" data-toggle="dropdown" role="button" aria-expanded="false"><img src="{{ staticUrl }}/multimedia/img/administrator.jpg" alt="您好" class="userPhoto" width="40" height="40">
                    <span class="sDes">欢迎</span>
                    <span class="sName">{{ user['name'] }}</span>
                    <i class="fa fa-angle-down"></i></a>
                <ul class="dropdown-menu userList clearfix" role="menu">
                    <li><a id="updatepassword" href="/sso/password"><i class="fa fa-user"></i>修改密码</a></li>
                    <li><a id="logout" href="#" onclick="logout()"><i class="fa fa-power-off"></i>登出</a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>

{% if hasLeftTree %}
<a href="javascript:void(0);" class="globalLeftNavIcon" id="globalLeftNavIcon"><i class="fa fa-bars"></i></a>
{% endif %}

<div class="wrapper">
    {% if hasLeftTree %}
    <div class="globalLeftNav" id="globalLeftNav">
        <ul class="leftNavList clearfix"></ul>
    </div>
    <script type="text/javascript">
        var $objPageLeftTreeNav=JSON.parse('{{ lefttree|dump|safe }}')
        var $strCurrentPath="{{ currentPath }}"
        //To produce left tree here
    </script>
    <script src="{{ staticUrl }}/common/js/objPageLeftTreeNav.js"></script>
    {% endif %}

    <div class="main" {% if hasLeftTree %} class="mainAll" {% endif %}>
        <div class="container-fluid">
         <div class="row funcList" style="padding-bottom: 13px">
             {% block funcbar %}
             {% endblock %}
         </div>
        {% block main %}
        {% endblock %}
        </div>
    </div>
</div>

</body>
</html>